package ks3;
import java.util.Arrays;
public class Main3 {
    public static void main(String[] args) {
        int[] ns = { 28, 12, 89, 73, 65, 18, 96, 50, 8, 36 };
        // per
        System.out.println(Arrays.toString(ns));
        
        //z put
        for (int i=0 ;i<ns.length-1;i++ ) {
        	for (int j=0;j<ns.length-i-1 ;j++ ) {
        		//smap
        		if (ns[j]>ns[j+1]) {
        			int tem=0;
        			tem = ns[j];
        			ns[j] = ns[j+1];
        			ns[j+1] = tem; 
        		}
        	}
        }
        System.out.println(Arrays.toString(ns));
        //f put
       for (int i= 0;i<ns.length-1 ; i++ ) {
       	for (int y=0;j<ns.length-i-1 ;j++ ) {
       		if (ns[j]<ns[j+1]) {
       			int tem=0;
       			tem = ns[j];
       			ns[j]= ns[j+1];
       			ns[j+1] = tem;
       		}
       	}
       }
        //sorted
     	System.out.println(Arrays.toString(ns));
       
    }
}